//
//  ZZNavigationController.m
//  NetesaeLottery
//
//  Created by 周英培 on 16/8/1.
//  Copyright © 2016年 周英培. All rights reserved.
//

#import "ZZNavigationController.h"

@interface ZZNavigationController ()

@end

@implementation ZZNavigationController

// 调用: 当程序第一次加载和使用这个类的使用调用,并且只来一次 性能优化好
+ (void)initialize {

    UINavigationBar *naB = [UINavigationBar appearance];
    
    [naB setBackgroundImage:[UIImage imageNamed:@"NavBar64"] forBarMetrics:UIBarMetricsDefault];
    
    [naB setTitleTextAttributes:@{
                                 NSForegroundColorAttributeName:[UIColor whiteColor]
                                 }];
    
    [naB setTintColor:[UIColor whiteColor]];

}

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
}

/// 重写push方法,拦截所有的push操作
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {

    viewController.hidesBottomBarWhenPushed = YES;
    
    [super pushViewController:viewController animated:animated];

}


@end
